import request from '@/utils/request'

// 查询灾害风险点信息列表
export function listRisk(query) {
  return request({
    url: '/disasterRisk/queryDisasterRiskList',
    method: 'get',
    params: query
  })
}

// 查询灾害风险点信息详细
export function getRisk(id) {
  return request({
    url: '/disasterRisk/queryData?id=' + id,
    method: 'get'
  })
}

// 新增灾害风险点信息
export function addRisk(data) {
  return request({
    url: '/system/risk',
    method: 'post',
    data: data
  })
}

// 修改灾害风险点信息
export function updateRisk(data) {
  return request({
    url: '/disasterRisk/modifyData',
    method: 'post',
    data: data
  })
}

// 删除灾害风险点信息
export function delRisk(id) {
  return request({
    url: '/disasterRisk/deleteDisasterRisk?ids=' + id,
    method: 'get'
  })
}

//地图查询全部灾害风险点列表
export function mapAllListRisk() {
  return request({
    url: '/disasterRisk/getDisasterRiskAllData',
    method: 'get'
  })
}
